<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>

        function f1(){
            window.alert("test");
        }

        function f2(){
            var r=window.confirm("test");
            console.log(r);
        }

        function f3(){
            var r=window.prompt("test");
            console.log(r);
        }

    </script>

</head>
<body>
    <a href="javascript:;" onclick="f1();">test1</a>
    <a href="javascript:;" onclick="f2();">test2</a>
    <a href="javascript:;" onclick="f3();">test3</a>
</body>
</html>